home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / shared_lib / test.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-09  |  660 b   |  40 lines

  1. /*
  2.  *    (c)Copyright 1992-1997 Obvious Implementations Corp.  Redistribution and
  3.  *    use is allowed under the terms of the DICE-LICENSE FILE,
  4.  *    DICE-LICENSE.TXT.
  5.  */
  6.  
  7. /*
  8.  *  TEST.C
  9.  */
  10.  
  11. /*
  12.  *  The #ifdef is to demonstrate what is required to compile this
  13.  *  test program with registered args.
  14.  */
  15.  
  16. #ifdef REGISTERED
  17. #include "test-protos.h"
  18. #include <stdio.h>
  19. #endif
  20.  
  21. main(ac, av)
  22. short ac;
  23. char *av[];
  24. {
  25.     if (ac == 1) {
  26.     char buf[256];
  27.     while (GetString(buf, sizeof(buf)) >= 0)
  28.         printf("GET: %s\n", buf);
  29.     } else {
  30.     short i;
  31.  
  32.     for (i = 1; i < ac; ++i) {
  33.         PostString(av[i]);
  34.         printf("POSTED: %s\n", av[i]);
  35.     }
  36.     }
  37.     return(0);
  38. }
  39.  
  40.